function register(tbl){
	let user_id=tbl.user_id;
	let registration_id=tbl.registration_id;
	let reg=dao.fetch("user_registration",Cnd.where("user_id","=",user_id))
	if(reg==null){
		let tab=new Record();
		tab.put("_table","user_registration")
		tab.put("userid",user_id)
		tab.put("registration_id",registration_id)
		dao.insert(tab)
		attr("return",{"error":200,"message":"success",
			"data":{"registration_id":registration_id}})
	}else{
		attr("return",{"error":200,"message":"success",
			"data":{"registration_id":reg.registration_id}})
	}
	return "json"
}